<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zxx">

<head>
<title>Login</title>
<!-- Meta tags -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- //Meta tags -->
<link rel="stylesheet" href="css/style1.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- font-awesome-icons -->	
<link rel="stylesheet" href="layui/css/layui.css" media="all">
</head>

<body>
	<section class="w3l-form-36">
		<div class="form-36-mian section-gap">
			<div class="wrapper">
				<div class="form-inner-cont">
					<h3>登录</h3>
					<form action="login" method="post" class="signin-form">
						<span style="color:red;">${msg}</span>
						<div class="form-input">
							<span class="fa fa-envelope-o" aria-hidden="true"></span> <input
								type="text" name="username" id="username" placeholder="Username"
								required />
						</div>
						<div class="form-input">
							<span class="fa fa-key" aria-hidden="true"></span> <input
								type="password" name="userpwd" id="userpwd"
								placeholder="Password" required />
						</div>
						<div class="login-remember d-grid">
							<label class="check-remaind"> 
							<input type="checkbox" value="true" name="cksremember" id="cksremember">
							 <span class="checkmark"></span>
								<p class="remember">记住密码</p>
							</label>
							<button class="btn theme-button">登录</button>
						</div>
						<div class="new-signup">
							<a href="#reload" class="signuplink">忘记密码?</a>
						</div>
					</form>
				</div>

				<!-- copyright -->
				<div class="copy-right">
					<p>
						© Popcorn&copy; 2020. 版权所有 bug总和我作队 
					</p>
				</div>
			</div>
		</div>
	</section>
	<script type="text/javascript" src="js/jquery-2.0.3.js"></script>
	<script type="text/javascript" src="js/jquery.cookie.js"></script>
	<script src="layui/layui.js" charset="utf-8"></script>
	<script>
		  $(function(){
			//("#username").blur 文本框失去焦点事件
		  	$("#username").blur(function(){
				  //读取用户名和密码的cookie信息
				  var username = $.cookie('username');
				  var userpwd = $.cookie('userpwd');
				  console.log(username);
				  console.log(userpwd);
				  //如果用户输入的用户名 和 读取用户名一致
				  if($(this).val() == username){
				     //就将密码显示在密码框中
				     $("#userpwd").val(userpwd); 
				  }
			 });
			
		 })
	</script>
</body>

</html>